package com.czl.elm.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.czl.elm.domain.Estimate;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface EstimateMapper {
    Integer addEstimate(Estimate estimate);

    IPage<Map<String, Object>> getEstimateByShop_getTime(Integer shopId, Integer currentPage, Integer size, Page<Map<String, Object>> page);

    IPage<Map<String, Object>> getEstimateByShop_useful(Integer shopId, Integer currentPage, Integer size, Page<Map<String, Object>> page);

    IPage<Map<String, Object>> getEstimateByShop_photo(Integer shopId, Integer currentPage, Integer size, Page<Map<String, Object>> page);

    IPage<Map<String, Object>> getEstimateByShop_goodEs(Integer shopId, Integer currentPage, Integer size, Page<Map<String, Object>> page);

    IPage<Map<String, Object>> getEstimateByShop_badEs(Integer shopId, Integer currentPage, Integer size, Page<Map<String, Object>> page);

    Integer getEstimateByShop_getTimeNum(Integer shopId);

    Integer getEstimateByShop_usefulNum(Integer shopId);

    Integer getEstimateByShop_photoNum(Integer shopId);

    Integer getEstimateByShop_goodEsNum(Integer shopId);

    Integer getEstimateByShop_badEsNum(Integer shopId);

    List<Map<String, String>> getTag();

    Integer addUseful(String estimateId);

    Integer addUsefulByPhone(String phoneName, String estimateId, int likes);

    Integer subUseful(String estimateId);

    Integer subUsefulByPhone(String phoneName, String estimateId);
}
